#ifndef tmAnimation_h__
#define tmAnimation_h__

#include "./tmInclude.h"
#include "./tmControl.h"
#include "./tmTimer.h"

class tmSlidingAnim : public GLES::Object
{
	SetGetProperty(Margine,float,_margine);
	SetGetProperty(Speed,float,_speed);
	SetGetProperty(IsMoving,bool,_moving);
	//SetGetProperty(Distance,float,_distance);
public:
	tmSlidingAnim():_state(Normal),_moving(false),_speed(0){}
	float getMovingDistance();;
	VOID onInput( int x,InputType type );
	VOID onPressed(int x);
	VOID onDragged(int x);
	VOID onPressRelease(int x);
	VOID onDragRelease(int x);

protected:
	GestureState	_state;
	tmTimer			_timer;
	int				_position;
};

#endif // tmAnimation_h__